package com.zhhtech.zhh.wxapi

import com.zhhtech.zhh.ui.utils.Logger
import com.tencent.mm.opensdk.modelbase.BaseResp
import com.umeng.socialize.weixin.view.WXCallbackActivity

typealias WXPayCallback = (resp: BaseResp) -> Unit

class WXPayEntryActivity : WXCallbackActivity() {

    companion object {

        @JvmStatic
        var wxPayCallback: WXPayCallback? = null
    }

    override fun onResp(resp: BaseResp) {
        super.onResp(resp)
        Logger.e("WXPayEntryActivity==>")
        kotlin.runCatching {
            wxPayCallback?.invoke(resp)
        }
        wxPayCallback = null
    }
}